<?php
/**
 * [PHPFOX_HEADER]
 */

defined('PHPFOX') or exit('NO DICE!');

/**
 * 
 * 
 * @copyright		[PHPFOX_COPYRIGHT]
 * @author  		Raymond Benc
 * @package 		Phpfox_Component
 * @version 		$Id: list.class.php 1166 2009-10-09 11:38:32Z Raymond_Benc $
 */
class Marketplace_Component_Block_TopList extends Phpfox_Component
{
	/**
	 * Class process method wnich is used to execute this component.
	 */
	public function process()
	{
            $aListings = Phpfox::getService("marketplace.store")->suggestListings(Phpfox::getUserId());
            $this->template()->assign(array(
                "aListings" => $aListings
            ));
            return 'block';
	}
	
	/**
	 * Garbage collector. Is executed after this class has completed
	 * its job and the template has also been displayed.
	 */
	public function clean()
	{
		(($sPlugin = Phpfox_Plugin::get('marketplace.component_block_toplist_clean')) ? eval($sPlugin) : false);
	}
}

?>